function s() {
    var spans = document.getElementById('select').children;
    for (var i = 0; i < spans.length; i++) {
        Tap(spans[i], function (e, dom) {
            for (var o = 0; o < spans.length; o++) {
                spans[o].className = '';
                document.querySelectorAll('section')[o].style = 'display:none;opacity:0;';
            }
            var idname = dom.getAttribute('main');
            var index = dom.getAttribute('index');
            dom.className = 'bblack';
            document.getElementById(idname);
            document.querySelectorAll('section')[index].style.display = '';
            setTimeout(function () {
                document.querySelectorAll('section')[index].style.opacity = 1;
            });
        })
    }
};
//顶部4个选择END
function jshtml(data, scriptdom, idname) {
    var mainmax = document.getElementById(idname);
    var html = '';
    for (var k in data) {
        var htmlm = scriptdom.innerHTML;
        htmlm = htmlm.replace(/\{\{imgsrc\}\}/, data[k].imgsrc);
        htmlm = htmlm.replace(/\{\{alt\}\}/, data[k].alt);
        htmlm = htmlm.replace(/\{\{h3\}\}/, data[k].h3);
        htmlm = htmlm.replace(/\{\{h5\}\}/, data[k].h5);
        htmlm = htmlm.replace(/\{\{span\}\}/, data[k].span);
        htmlm = htmlm.replace(/\{\{i\}\}/, data[k].i);
        html += htmlm;
    }
    mainmax.innerHTML = html;
};
//ajax模板END
window.onload = function () {
    ajax({
        method: 'GET',
        url: '',
        data: {},
        success: function (response) {
            response = JSON.parse(response);
        }
    });
    s();
    totop('.TOTOP');
};